#include "enor.h"
#include <iostream>
#include <algorithm>

class MyIterator : public ph::enor<int>{
private: 
	bool vege;
	int akt;
	int arr[5];
	int i;
public:
	virtual void first(){ std::cout<<"first"<<std::endl;            arr[0]=0; arr[1]=1; arr[2]=2; arr[3]=3; arr[4]=4; i=-1; next(); }
	virtual void next(){ std::cout<<"next"<<std::endl;              i++; vege=i==5; akt=arr[i]; }
	virtual const int& current() const {std::cout<<"current: "<<akt<<std::endl;   return akt;}
	virtual const bool end()const {return vege;}
};




int main(){
	MyIterator t;
	auto a = ph::max(t, [](int a)-> int{return a;});

	std::cin.ignore();
}